|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectcom.epiphan.vga2usb.KVM
KVM wrapper for a KVM-enabled grabber. Keyboard scan codes defined in this class implement a subset of so-called Scan Code Set 2, which is the default scan code set for all modern keyboards.
Nested Class Summary | |
static class |
KVM.Key
Standard PS/2 scancode descriptor. |
Field Summary | |
static KVM.Key |
KEY_0
0x45 - 0xF0,0x45 |
static KVM.Key |
KEY_1
0x16 - 0xF0,0x16 |
static KVM.Key |
KEY_2
0x1E - 0xF0,0x1E |
static KVM.Key |
KEY_3
0x26 - 0xF0,0x26 |
static KVM.Key |
KEY_4
0x25 - 0xF0,0x25 |
static KVM.Key |
KEY_5
0x2E - 0xF0,0x2E |
static KVM.Key |
KEY_6
0x36 - 0xF0,0x36 |
static KVM.Key |
KEY_7
0x3D - 0xF0,0x3D |
static KVM.Key |
KEY_8
0x3E - 0xF0,0x3E |
static KVM.Key |
KEY_9
0x46 - 0xF0,0x46 |
static KVM.Key |
KEY_A
0x1C - 0xF0,0x1C |
static KVM.Key |
KEY_ADD
0x79 - 0xF0,0x79 |
static KVM.Key |
KEY_ALT
0x11 - 0xF0,0x11 |
static KVM.Key |
KEY_B
0x32 - 0xF0,0x32 |
static KVM.Key |
KEY_BACK_QUOTE
0x0E - 0xF0,0x0E |
static KVM.Key |
KEY_BACK_SLASH
0x5D - 0xF0,0x5D |
static KVM.Key |
KEY_BACK_SPACE
0x66 - 0xF0,0x66 |
static KVM.Key |
KEY_C
0x21 - 0xF0,0x21 |
static KVM.Key |
KEY_CAPS_LOCK
0x58 - 0xF0,0x58 |
static KVM.Key |
KEY_CLOSE_BRACKET
0x5B - 0xF0,0x5B |
static KVM.Key |
KEY_COMMA
0x41 - 0xF0,0x41 |
static KVM.Key |
KEY_CONTROL
0x14 - 0xF0,0x14 |
static KVM.Key |
KEY_D
0x23 - 0xF0,0x23 |
static KVM.Key |
KEY_DECIMAL
0x71 - 0xF0,0x71 |
static KVM.Key |
KEY_DELETE
0xE0,0x71 - 0xE0,0xF0,0x71 |
static KVM.Key |
KEY_DIVIDE
0xE0,0x4A - 0xE0,0xF0,0x4A |
static KVM.Key |
KEY_DOWN
0xE0,0x72 - 0xE0,0xF0,0x72 |
static KVM.Key |
KEY_E
0x24 - 0xF0,0x24 |
static KVM.Key |
KEY_END
0xE0,0x69 - 0xE0,0xF0,0x69 |
static KVM.Key |
KEY_ENTER
0x5A - 0xF0,0x5A |
static KVM.Key |
KEY_EQUALS
0x55 - 0xF0,0x55 |
static KVM.Key |
KEY_ESCAPE
0x76 - 0xF0,0x76 |
static KVM.Key |
KEY_F
0x2B - 0xF0,0x2B |
static KVM.Key |
KEY_F1
0x05 - 0xF0,0x05 |
static KVM.Key |
KEY_F10
0x09 - 0xF0,0x09 |
static KVM.Key |
KEY_F11
0x78 - 0xF0,0x78 |
static KVM.Key |
KEY_F12
0x07 - 0xF0,0x07 |
static KVM.Key |
KEY_F2
0x06 - 0xF0,0x06 |
static KVM.Key |
KEY_F3
0x04 - 0xF0,0x04 |
static KVM.Key |
KEY_F4
0x0C - 0xF0,0x0C |
static KVM.Key |
KEY_F5
0x03 - 0xF0,0x03 |
static KVM.Key |
KEY_F6
0x0B - 0xF0,0x0B |
static KVM.Key |
KEY_F7
0x83 - 0xF0,0x83 |
static KVM.Key |
KEY_F8
0x0A - 0xF0,0x0A |
static KVM.Key |
KEY_F9
0x01 - 0xF0,0x01 |
static KVM.Key |
KEY_G
0x34 - 0xF0,0x34 |
static KVM.Key |
KEY_H
0x33 - 0xF0,0x33 |
static KVM.Key |
KEY_HOME
0xE0,0x6C - 0xE0,0xF0,0x6C |
static KVM.Key |
KEY_I
0x43 - 0xF0,0x43 |
static KVM.Key |
KEY_INSERT
0xE0,0x70 - 0xE0,0xF0,0x70 |
static KVM.Key |
KEY_J
0x3B - 0xF0,0x3B |
static KVM.Key |
KEY_K
0x42 - 0xF0,0x42 |
static KVM.Key |
KEY_L
0x4B - 0xF0,0x4B |
static KVM.Key |
KEY_LEFT
0xE0,0x6B - 0xE0,0xF0,0x6B |
static KVM.Key |
KEY_M
0x3A - 0xF0,0x3A |
static KVM.Key |
KEY_MINUS
0x4E - 0xF0,0x4E |
static KVM.Key |
KEY_MULTIPLY
0x7C - 0xF0,0x7C |
static KVM.Key |
KEY_N
0x31 - 0xF0,0x31 |
static KVM.Key |
KEY_NUM_LOCK
0x77 - 0xF0,0x77 |
static KVM.Key |
KEY_NUMPAD0
0x70 - 0xF0,0x70 |
static KVM.Key |
KEY_NUMPAD1
0x69 - 0xF0,0x69 |
static KVM.Key |
KEY_NUMPAD2
0x72 - 0xF0,0x72 |
static KVM.Key |
KEY_NUMPAD3
0x7A - 0xF0,0x7A |
static KVM.Key |
KEY_NUMPAD4
0x6B - 0xF0,0x6B |
static KVM.Key |
KEY_NUMPAD5
0x73 - 0xF0,0x73 |
static KVM.Key |
KEY_NUMPAD6
0x74 - 0xF0,0x74 |
static KVM.Key |
KEY_NUMPAD7
0x6C - 0xF0,0x6C |
static KVM.Key |
KEY_NUMPAD8
0x75 - 0xF0,0x75 |
static KVM.Key |
KEY_NUMPAD9
0x7D - 0xF0,0x7D |
static KVM.Key |
KEY_O
0x44 - 0xF0,0x44 |
static KVM.Key |
KEY_OPEN_BRACKET
0x54 - 0xF0,0x54 |
static KVM.Key |
KEY_P
0x4D - 0xF0,0x4D |
static KVM.Key |
KEY_PAGE_DOWN
0xE0,0x7A - 0xE0,0xF0,0x7A |
static KVM.Key |
KEY_PAGE_UP
0xE0,0x7D - 0xE0,0xF0,0x7D |
static KVM.Key |
KEY_PERIOD
0x49 - 0xF0,0x49 |
static KVM.Key |
KEY_Q
0x15 - 0xF0,0x15 |
static KVM.Key |
KEY_QUOTE
0x52 - 0xF0,0x52 |
static KVM.Key |
KEY_R
0x2D - 0xF0,0x2D |
static KVM.Key |
KEY_RIGHT
0xE0,0x74 - 0xE0,0xF0,0x74 |
static KVM.Key |
KEY_S
0x1B - 0xF0,0x1B |
static KVM.Key |
KEY_SEMICOLON
0x4C - 0xF0,0x4C |
static KVM.Key |
KEY_SHIFT
0x12 - 0xF0,0x12 |
static KVM.Key |
KEY_SLASH
0x4A - 0xF0,0x4A |
static KVM.Key |
KEY_SPACE
0x29 - 0xF0,0x29 |
static KVM.Key |
KEY_SUBTRACT
0x7B - 0xF0,0x7B |
static KVM.Key |
KEY_T
0x2C - 0xF0,0x2C |
static KVM.Key |
KEY_TAB
0x0D - 0xF0,0x0D |
static KVM.Key |
KEY_U
0x3C - 0xF0,0x3C |
static KVM.Key |
KEY_UP
0xE0,0x75 - 0xE0,0xF0,0x75 |
static KVM.Key |
KEY_V
0x2A - 0xF0,0x2A |
static KVM.Key |
KEY_W
0x1D - 0xF0,0x1D |
static KVM.Key |
KEY_X
0x22 - 0xF0,0x22 |
static KVM.Key |
KEY_Y
0x35 - 0xF0,0x35 |
static KVM.Key |
KEY_Z
0x1A - 0xF0,0x1A |
Constructor Summary | |
KVM(Grabber g)
Creates KVM wrapper for the specified grabber. |
Method Summary | |
static KVM.Key |
findKey(int vk)
Finds the scancode descriptor for the specified virtual key code. |
void |
reset()
Generates mouse and keyboard reset sequence. |
void |
resetKeyboard()
Generates keyboard reset sequence. |
void |
resetMouse()
Generates mouse reset sequence. |
boolean |
sendKeyEvent(int vk,
boolean down)
Generates a single keyboard event. |
void |
sendKeyEvent(KVM.Key key,
boolean down)
Generates a single keyboard event. |
void |
sendMouseEvent(int dx,
int dy,
boolean left,
boolean right)
Generates a single mouse event. |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final KVM.Key KEY_0
0x45 - 0xF0,0x45
public static final KVM.Key KEY_1
0x16 - 0xF0,0x16
public static final KVM.Key KEY_2
0x1E - 0xF0,0x1E
public static final KVM.Key KEY_3
0x26 - 0xF0,0x26
public static final KVM.Key KEY_4
0x25 - 0xF0,0x25
public static final KVM.Key KEY_5
0x2E - 0xF0,0x2E
public static final KVM.Key KEY_6
0x36 - 0xF0,0x36
public static final KVM.Key KEY_7
0x3D - 0xF0,0x3D
public static final KVM.Key KEY_8
0x3E - 0xF0,0x3E
public static final KVM.Key KEY_9
0x46 - 0xF0,0x46
public static final KVM.Key KEY_A
0x1C - 0xF0,0x1C
public static final KVM.Key KEY_ADD
0x79 - 0xF0,0x79
public static final KVM.Key KEY_ALT
0x11 - 0xF0,0x11
public static final KVM.Key KEY_B
0x32 - 0xF0,0x32
public static final KVM.Key KEY_BACK_QUOTE
0x0E - 0xF0,0x0E
public static final KVM.Key KEY_BACK_SLASH
0x5D - 0xF0,0x5D
public static final KVM.Key KEY_BACK_SPACE
0x66 - 0xF0,0x66
public static final KVM.Key KEY_C
0x21 - 0xF0,0x21
public static final KVM.Key KEY_CAPS_LOCK
0x58 - 0xF0,0x58
public static final KVM.Key KEY_CLOSE_BRACKET
0x5B - 0xF0,0x5B
public static final KVM.Key KEY_COMMA
0x41 - 0xF0,0x41
public static final KVM.Key KEY_CONTROL
0x14 - 0xF0,0x14
public static final KVM.Key KEY_D
0x23 - 0xF0,0x23
public static final KVM.Key KEY_DECIMAL
0x71 - 0xF0,0x71
public static final KVM.Key KEY_DELETE
0xE0,0x71 - 0xE0,0xF0,0x71
public static final KVM.Key KEY_DIVIDE
0xE0,0x4A - 0xE0,0xF0,0x4A
public static final KVM.Key KEY_DOWN
0xE0,0x72 - 0xE0,0xF0,0x72
public static final KVM.Key KEY_E
0x24 - 0xF0,0x24
public static final KVM.Key KEY_END
0xE0,0x69 - 0xE0,0xF0,0x69
public static final KVM.Key KEY_ENTER
0x5A - 0xF0,0x5A
public static final KVM.Key KEY_EQUALS
0x55 - 0xF0,0x55
public static final KVM.Key KEY_ESCAPE
0x76 - 0xF0,0x76
public static final KVM.Key KEY_F
0x2B - 0xF0,0x2B
public static final KVM.Key KEY_F1
0x05 - 0xF0,0x05
public static final KVM.Key KEY_F10
0x09 - 0xF0,0x09
public static final KVM.Key KEY_F11
0x78 - 0xF0,0x78
public static final KVM.Key KEY_F12
0x07 - 0xF0,0x07
public static final KVM.Key KEY_F2
0x06 - 0xF0,0x06
public static final KVM.Key KEY_F3
0x04 - 0xF0,0x04
public static final KVM.Key KEY_F4
0x0C - 0xF0,0x0C
public static final KVM.Key KEY_F5
0x03 - 0xF0,0x03
public static final KVM.Key KEY_F6
0x0B - 0xF0,0x0B
public static final KVM.Key KEY_F7
0x83 - 0xF0,0x83
public static final KVM.Key KEY_F8
0x0A - 0xF0,0x0A
public static final KVM.Key KEY_F9
0x01 - 0xF0,0x01
public static final KVM.Key KEY_G
0x34 - 0xF0,0x34
public static final KVM.Key KEY_H
0x33 - 0xF0,0x33
public static final KVM.Key KEY_HOME
0xE0,0x6C - 0xE0,0xF0,0x6C
public static final KVM.Key KEY_I
0x43 - 0xF0,0x43
public static final KVM.Key KEY_INSERT
0xE0,0x70 - 0xE0,0xF0,0x70
public static final KVM.Key KEY_J
0x3B - 0xF0,0x3B
public static final KVM.Key KEY_K
0x42 - 0xF0,0x42
public static final KVM.Key KEY_L
0x4B - 0xF0,0x4B
public static final KVM.Key KEY_LEFT
0xE0,0x6B - 0xE0,0xF0,0x6B
public static final KVM.Key KEY_M
0x3A - 0xF0,0x3A
public static final KVM.Key KEY_MINUS
0x4E - 0xF0,0x4E
public static final KVM.Key KEY_MULTIPLY
0x7C - 0xF0,0x7C
public static final KVM.Key KEY_N
0x31 - 0xF0,0x31
public static final KVM.Key KEY_NUM_LOCK
0x77 - 0xF0,0x77
public static final KVM.Key KEY_NUMPAD0
0x70 - 0xF0,0x70
public static final KVM.Key KEY_NUMPAD1
0x69 - 0xF0,0x69
public static final KVM.Key KEY_NUMPAD2
0x72 - 0xF0,0x72
public static final KVM.Key KEY_NUMPAD3
0x7A - 0xF0,0x7A
public static final KVM.Key KEY_NUMPAD4
0x6B - 0xF0,0x6B
public static final KVM.Key KEY_NUMPAD5
0x73 - 0xF0,0x73
public static final KVM.Key KEY_NUMPAD6
0x74 - 0xF0,0x74
public static final KVM.Key KEY_NUMPAD7
0x6C - 0xF0,0x6C
public static final KVM.Key KEY_NUMPAD8
0x75 - 0xF0,0x75
public static final KVM.Key KEY_NUMPAD9
0x7D - 0xF0,0x7D
public static final KVM.Key KEY_O
0x44 - 0xF0,0x44
public static final KVM.Key KEY_OPEN_BRACKET
0x54 - 0xF0,0x54
public static final KVM.Key KEY_P
0x4D - 0xF0,0x4D
public static final KVM.Key KEY_PAGE_DOWN
0xE0,0x7A - 0xE0,0xF0,0x7A
public static final KVM.Key KEY_PAGE_UP
0xE0,0x7D - 0xE0,0xF0,0x7D
public static final KVM.Key KEY_PERIOD
0x49 - 0xF0,0x49
public static final KVM.Key KEY_Q
0x15 - 0xF0,0x15
public static final KVM.Key KEY_QUOTE
0x52 - 0xF0,0x52
public static final KVM.Key KEY_R
0x2D - 0xF0,0x2D
public static final KVM.Key KEY_RIGHT
0xE0,0x74 - 0xE0,0xF0,0x74
public static final KVM.Key KEY_S
0x1B - 0xF0,0x1B
public static final KVM.Key KEY_SEMICOLON
0x4C - 0xF0,0x4C
public static final KVM.Key KEY_SHIFT
0x12 - 0xF0,0x12
public static final KVM.Key KEY_SLASH
0x4A - 0xF0,0x4A
public static final KVM.Key KEY_SPACE
0x29 - 0xF0,0x29
public static final KVM.Key KEY_SUBTRACT
0x7B - 0xF0,0x7B
public static final KVM.Key KEY_T
0x2C - 0xF0,0x2C
public static final KVM.Key KEY_TAB
0x0D - 0xF0,0x0D
public static final KVM.Key KEY_U
0x3C - 0xF0,0x3C
public static final KVM.Key KEY_UP
0xE0,0x75 - 0xE0,0xF0,0x75
public static final KVM.Key KEY_V
0x2A - 0xF0,0x2A
public static final KVM.Key KEY_W
0x1D - 0xF0,0x1D
public static final KVM.Key KEY_X
0x22 - 0xF0,0x22
public static final KVM.Key KEY_Y
0x35 - 0xF0,0x35
public static final KVM.Key KEY_Z
0x1A - 0xF0,0x1A
Constructor Detail |
public KVM(Grabber g)
g
- the grabber for which to create KVM wrapper.
IllegalArgumentException
- if grabber is not KVM capable.Method Detail |
public static KVM.Key findKey(int vk)
vk
- virtual key code.
null
if not found.public void reset() throws IOException
IOException
- if an I/O error occurs.public void resetKeyboard() throws IOException
IOException
- if an I/O error occurs.public void resetMouse() throws IOException
IOException
- if an I/O error occurs.public boolean sendKeyEvent(int vk, boolean down) throws IOException
vk
- virtual key code from a KeyEvent
down
- true
if the key is pressed,
false
if it was released
true
if PS/2 scancode was found for this virtual
key code, false
otherwise.
IOException
- if an I/O error occursKeyEvent
public void sendKeyEvent(KVM.Key key, boolean down) throws IOException
key
- the key codedown
- true
if the key is pressed, false
if it was released.
IOException
- if an I/O error occurspublic void sendMouseEvent(int dx, int dy, boolean left, boolean right) throws IOException
dx
- horizontal amount.dy
- vertical amount.left
- true
if left button is pressed.right
- true
if right button is pressed.
IOException
- if an I/O error occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |